package com.lch.distributed.serialize;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.Socket;

/**
 * @author: liuchenhui
 * @create: 2019-06-02 21:16
 **/
public class Client {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("localhost", 8089);

        ObjectOutputStream objectOutputStream = new ObjectOutputStream(socket.getOutputStream());

        User user = new User();
        user.setName("123");
        objectOutputStream.writeObject(user);
    }
}
